import 'package:richedit/data/audio_entity.dart';

audioEntityFromJson(AudioEntity data, Map<String, dynamic> json) {
	if (json['name'] != null) {
		data.name = json['name'].toString();
	}
	if (json['url'] != null) {
		data.url = json['url'].toString();
	}
	if (json['align'] != null) {
		data.align = json['align'].toString();
	}
	if (json['full'] != null) {
		data.full = json['full'].toString();
	}
	if (json['text'] != null) {
		data.text = json['text'].toString();
	}
	return data;
}

Map<String, dynamic> audioEntityToJson(AudioEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['name'] = entity.name;
	data['url'] = entity.url;
	data['align'] = entity.align;
	data['full'] = entity.full;
	data['text'] = entity.text;
	return data;
}